<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="sso-login.js"></script>
<meta charset="UTF-8">
<title>Insert title here</title>

<script type="text/javascript">
	window.onload = function(){
		var path = window.location.href;
		getStr(path);
	}

	//设置cookie，设置好以后关闭当前窗口  
	function getStr(path){
		var pathStr = decodeURIComponent(path);
		if(pathStr.indexOf("=")!=-1){
	       var start = pathStr.indexOf("=");
	       var jsonStr = pathStr.substring(start+1);
		   //alert(jsonStr);
	       var jsonObj = eval("("+jsonStr+")");
	       var username = jsonObj.username;
		   var nickname = jsonObj.nickname;
	       var uid = jsonObj.uid;
		   var mid = jsonObj.mid;
		   var code = jsonObj.code;
	       var _date = new Date();
	       　　    _date.setDate(_date.getDate()+1);
	       　    　_date.toGMTString();
	       　    //这里的username_fouNder和uid_fouNder尽可能复杂麻烦些   以避免将来在取cookie时防止其他程序往页面写cookie时 重复  
	       setCookie("username_fouNder", nickname);
	       setCookie("uid_fouNder", uid);
		   setCookie("mid_fouNder", mid);
	       setCookie("code", code);
		   //window.opener.location.reload();
//	       window.close();

		}
	}
</script>
</head>
<body>
<div style="display:none">
  <input type="text" id="aaa" value="nihao"/>
  <a id="abc">写cookie</a> 
</div>
</body>
</html>